import { myRequest } from "./http.js";

//登录
export function login(config) {
    return myRequest({
        url: "/StoreageApp/Login",
        method: "post",
        data: config,
    });
}
// /StoreageApp/CommitVerify提交任务
export const CommitVerify = (prarms) => {
    return myRequest({
        url: `/StoreageApp/CommitVerify`,
        method: "get",
        data: prarms,
    });
};
// /StoreageApp/GetTask获取任务详情
export const GetTask = (prarms) => {
    return myRequest({
        url: `/StoreageApp/GetTask`,
        method: "get",
        data: prarms,
    });
};

// /StoreageApp/CreateTask创建任务
export const CreateTask = (prarms) => {
    return myRequest({
        url: `/StoreageApp/CreateTask`,
        method: "get",
        data: prarms,
    });
};

export const PostPackage = (prarms) => {
    return myRequest({
        url: `/StoreageApp/PostPackage`,
        method: "get",
        data: prarms,
    });
};
//get请求
export function pointName() {
    return myRequest({
        url: `/smtj/place-info/grid`,
        method: "get",
    });
}

//历史列表get请求
export function oldTask(params = {}) {
    return myRequest({
        url: `/StoreageApp/GetTaskList`,
        method: "get",
        data: params,
    });
}
//任务详情
export function taskDetail(params = {}) {
    return myRequest({
        url: `/StoreageApp/GetTask`,
        method: "get",
        data: params,
    });
}

// /Info/GetCountry获取国家列表
export const GetCountry = (prarms) => {
    return myRequest({
        url: `/Info/GetCountry`,
        method: "get",
        data: prarms,
    });
};
